﻿@using GoodMan.Infrastructure.Entities.Entity;
@{
    Layout = "~/Views/Shared/_Main.cshtml";
    int orderId = ViewBag.OrderId;
    Order order = ViewBag.order;
    int getintegration=0;
    int areacode=0;
    int integration = 0;
    if(order!=null)
    {
     getintegration = (int)order.TotalPrice;
     integration = (int)(order.TotalPrice*GoodMan.Portal.Biz.SupportBiz.GetCostRank());
        
     areacode=(int)order.AreaCode;
     
    }
    decimal limitprice = ViewBag.limitprice == null ? 5 : ViewBag.limitprice;
}
@section head
{
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            function jump(count) {
                window.setTimeout(function () {
                    count--;
                    if (count > 0) {
                        $('#num').html(count);
                        jump(count);
                    } else {
                        location.href = "/UserCenter/order";
                    }
                }, 1000);
            }
            jump(10);
        });
    </script>
}
<div class="row">
    <div class="span12 text-center">
        <br />
        <br />
        <br />
        <br />
        <div style="text-align: center">
            <table border="0" width="98%" cellpadding="0" cellspacing="0">
                <tr>
                    <td rowspan="3" align="right" width="25%">
                        <img src="../../Content/img/success.png">
                    </td>
                    <td align="center">
                        <b style="font-size: 30px; color: Green">亲，恭喜您，下单成功！</b>
                    </td>
                </tr>
                <tr>
                    <td align="center">
                        @{
                        if(areacode!=3){
                            <b style="font-size: 30px; color: Green">交易完成后，您将获得 @getintegration 积分</b>
                            }
                            else
                            {
                            <b style="font-size: 30px; color: Green">交易完成后，您将被扣除 @integration 积分</b>
                            }
                        }
                        
                    </td>
                </tr>
                <tr>
                    <td align="center">
                     @{
                         if (areacode != 3 && order.TotalPrice < limitprice)
                         {
                    <b style="font-size: 20px; color: Green">亲，您的购物不足@(limitprice),亲自行前往楼栋售货员处提货并付款。</b>
                         }
                         }
                    </td>
                    </tr>
            </table>
            <p style="vertical-align: middle">
                <span>页面将在<span id="num" style="color: Blue; font-size: 18px; font-weight: bold">10</span>秒后跳转</span>
            </p>
            <div style="text-align: left; margin-left: 300px;">
                <p style="line-height: 18px">
                    1、您的订单号：<b>@order.OrderCode</b><br />
                    2、您可以通过您所在楼栋的在线客服QQ订单情况或上门取货付款。<br />
                    3、您可以在<a href="/usercenter/order"><u>我的订单</u></a>中查看配货状态。<br />
                    <span style="font-size: 16px; color: red">4、您可以在交易完成后，对商品进行评价获取更多积分。</span>
                </p>
            </div>
        </div>
        <br />
        <br />
        <br />
    </div>
</div>
